<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME)}">{:L('PORTAL_ADMINSITE_INDEX')}</a></li>
        <li><a href="{:U(CONTROLLER_NAME.'/add')}">{:L('PORTAL_ADMINSITE_ADD')}</a></li>
    </ul>

    <form class="js-ajax-form" method="post" action="{:U(CONTROLLER_NAME.'/listorders')}">
        <div class="table-actions">
            <button type="submit" class="btn btn-primary btn-small js-ajax-submit">{:L('SORT')}</button>
        </div>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="50">{:L('SORT')}</th>
                <th width="10">ID</th>
                <th width="80">{:L('TITLE')}</th>
                <!-- <th>点击量</th> -->
                <th >{:L('XYZ')}</th>
                <th width="120"><span>{:L('CREATE_TIME')}</span></th>
                <th width="120">{:L('ACTIONS')}</th>
            </tr>
            </thead>
            <foreach name="posts" item="vo">
                <tr>
                    <th width="50"><input name="listorders[{$vo.id}]" type="text" size="3" value="{$vo.listorder}" class="input input-order"></th>
                    <td><a>{$vo.id}</a></td>
                    <td><span>{$vo.title}</span></td>
                    <!--  <td>0</td> -->
                    <td>{$vo.address}</td>
                    <td>{$vo.create_time}</td>
                    <td>
                        <a href="{:U(CONTROLLER_NAME.'/edit',array('id'=>$vo['id']))}">{:L('EDIT')}</a>|
                        <a href="{:U(CONTROLLER_NAME.'/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:L('DELETE')}</a>
                    </td>
                </tr>
            </foreach>
            <tfoot>
            <tr>
                <th width="50">{:L('SORT')}</th>
                <th width="100">ID</th>
                <th>{:L('TITLE')}</th>
                <!-- <th>点击量</th> -->
                <th width="80">{:L('XYZ')}</th>
                <th width="120"><span>{:L('CREATE_TIME')}</span></th>
                <th width="120">{:L('ACTIONS')}</th>
            </tr>
            </tfoot>
        </table>
        <div class="table-actions">
            <button type="submit" class="btn btn-primary btn-small js-ajax-submit">{:L('SORT')}</button>
        </div>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
    setCookie('refersh_time', 0);
    function refersh_window() {
        var refersh_time = getCookie('refersh_time');
        if (refersh_time == 1) {
            window.location.reload();
        }
    }
    setInterval(function() {
        refersh_window()
    }, 2000);
</script>
</body>
</html>